import { Injectable } from "@angular/core";

@Injectable()
export class WebsocketHelpers {
    
    public static isPresent(obj: any): boolean {
        return obj !== undefined && obj !== null;
    }

    public static isString(obj: any): boolean {
        return typeof obj === 'string';
    }

    public static isArray(obj: any): boolean {
        return Array.isArray(obj);
    }

    public static isFunction(obj: any): boolean {
        return typeof obj === 'function';
    }
}



// WEBPACK FOOTER //
// ./src/app/service/data-source/websocket-helpers.ts